package Easy;

public class Solution9 {
    // 9.回文数
    static public boolean isPalindrome(int x) {
        if(x<0)
            return false;
        int y = x;
        int sum = 0;
        while (y > 0) {
            sum = sum * 10 + y % 10;
            y=y/10;
        }
//        if (x == sum)
//            return true;
//        else
//            return false;
        return x==sum;
    }

    public static void main(String[] args) {
        System.out.println(isPalindrome(1121));
    }
}
